﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataGridViewDemo2_PreComand检查
{
    internal class getStr
    {
        public string first;
       public string end;
        public getStr(string str)
        {
            int tildeIndex = str.IndexOf('~');
            if (tildeIndex != -1)
            {
                // 找到了~字符
                first = str.Substring(0, tildeIndex); // 获取~之前的子字符串
                end = str.Substring(tildeIndex + 1); // 获取~之后的子字符串
            }
            else
            {
                // 没有找到~字符
                first = str; // first等于整个字符串
                end = str; // end也等于整个字符串
            }
        }
    }
}
